const mongoose = require('mongoose');

const UserSchema = new mongoose.Schema({
  username: {
    type: String,
    required: true
  },
  password: {
    type: String,
    required: true,
  },
  name: {
    type: String,
  },
  avatar: {
    type: String,
  },
  introduction: {
    type: String,
  },
  roles: {
    type: Array,
  },
  device_ids: {
    type: Array,
  },
}, {
  versionKey: false
});


module.exports = mongoose.model('User', UserSchema);
